package com.hengli.service;

import com.hengli.dto.EmployeeDTO;
import com.hengli.dto.EmployeeLoginDTO;
import com.hengli.dto.EmployeePageQueryDTO;
import com.hengli.dto.PasswordEditDTO;
import com.hengli.entity.Employee;
import com.hengli.result.PageResult;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface EmployeeService {

    /**
     * 员工登录
     * @param employeeLoginDTO
     * @return
     */
    Employee login(EmployeeLoginDTO employeeLoginDTO);

    /**
     * 新增员工
     * @param employeeDTO
     */
    void save(EmployeeDTO employeeDTO);


    /**
     * 员工分页查询
     * @param employeePageQueryDTO
     * @return
     */
    PageResult pageQuery(EmployeePageQueryDTO employeePageQueryDTO);

    /**
     * 启用禁用员工
     * @param status
     * @param id
     */
    void startOrStop(Integer status, Long id);

    /**
     * 删除员工
     * @param id
     */
    void delete(Long id);

    /**
     * 根据ID查询员工
     * @param id
     * @return
     */
    Employee getById(Long id);

    /**
     * 修改员工信息
     * @param employeeDTO
     */
    void update(EmployeeDTO employeeDTO);

    /**
     * 修改密码
     * @param passwordEditDTO
     * @param request
     */
    void editPassword(PasswordEditDTO passwordEditDTO, HttpServletRequest request);
}
